*{
    margin: 0;
    padding: 0;
}

#div1{

    width: 690px;
    height: 400px;
    border: 3px solid red;
    margin: auto;
    margin-top: 200px;
    perspective: 300px;
}

#div1 img{
    display: block;
    backface-visibility: hidden;
    transition: all 1s;
    
}

.front{
    position: absolute;
}
.back{
    position: absolute;
    transform: rotateX(-180deg);
}

#div1:hover .front{
    transform: rotateX(180deg);
}

#div1:hover .back{
    transform: rotateX(0deg);
}